Skip to content

Conversation

@mraspaud
Copy link
Member

This PR refactors the telemetry fetching to use xarray, and in the case of POD, the hmf frames are also decoded in a clearer manner.

@mraspaud mraspaud self-assigned this Oct 18, 2024
Copy link
Member

@sfinkens sfinkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Just some minor questions

Comment on lines +83 to +84
ict = ds["ICT"].mean(dim="back_scan").data[:, -3:]
space = ds["space_counts"].mean(dim="back_scan").data[:, -3:]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could

.data[:, -3:]

be replaced with

.sel(channel_name=slice(-3, None)).data

?

prt_counts = xr.DataArray(hmf_array["telemetry"]["PRT"],
dims=["scan_line_index", "PRT_measurement"])

# getting ICT counts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could also remove the comments

return potential_tbm_header.copy()
data_set_name = cls._decode_data_set_name(data_set_name)
tbm_header = potential_tbm_header.copy()
tbm_header["data_set_name"] = data_set_name.decode().strip("\x80").encode()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the .decode().strip().encode() part be moved to _decode_data_set_name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants